home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d2 / qedit.arc / QMAC.DOC < prev    next >
Encoding:
Text File  |  1988-11-14  |  6.3 KB  |  187 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.                              QMAC 1.0
  12.  
  13.    A utility for use with QEdit 2, the Quick Editor by SemWare
  14.  
  15.         Copyright 1988 by Sammy Mitchell and Karl Brendel
  16.  
  17.                        All rights reserved
  18.  
  19.  
  20.   QMAC is a translator of QEdit 2 macro files. It translates
  21. QEdit 2 macros from the binary file in which QEdit 2 saves macros
  22. to a text file which allows easy macro editing, and translates
  23. such text files to a QEdit 2 binary file. QMAC allows appending
  24. to or overwriting existing files, making it easy to add new
  25. macros to existing files. QMAC's text file format allows
  26. comments, permitting documentation of the macros within their
  27. "source file".
  28.  
  29.   Altho QMAC is a copyrighted work, it may be freely distributed,
  30. subject to the following conditions: QMAC must be distributed
  31. with full documentation, and with no modification of the program
  32. itself or the original documentation or any accompanying files,
  33. such as sample macro files, otherwise than herein provided.
  34. Users' groups and disk distributors may append brief documen-
  35. tation of their own. Other than nominal charges for disk dupli-
  36. cation services, no fee may be received for the distribution of
  37. the QMAC files without the written permission of Sammy Mitchell
  38. or Karl Brendel. Distributors who already have permission to
  39. distribute QEdit 2 are exempt from this requirement.
  40.  
  41.   No registration fee is required for the continuing use of QMAC.
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.   To run QMAC, at the DOS prompt type:
  50.  
  51.             QMAC [?] [bfn] [tfn] [om] [am]
  52.  
  53. and press Enter. The items shown in [] are parameters which may
  54. be entered at the DOS prompt. Do not type the []. QMAC will
  55. prompt for any required parameters which are not supplied at the
  56. DOS prompt. If parameters are provided at the DOS prompt, they
  57. must be given in the order shown, except that the [?] should be
  58. entered only if requesting help. If the [?] appears as the first
  59. parameter, all other parameters at the DOS prompt are ignored.
  60. Parameters which are not required may be omitted, and will be
  61. ignored if given.
  62.  
  63.   The parameters are:
  64.  
  65.             ?   == request for a help summary
  66.             bfn == filespec of the compiled macro file
  67.             tfn == filespec of the text macro file
  68.             om  == output mode : T(ext) or B(inary)
  69.             am  == append mode : Y(es) or N(o)
  70.  
  71. [om] and [am] are required only if [bfn] and [tfn] both specify
  72. existing files. If only one of the files is existing, [om] is
  73. determined by the type of the existing file: if the existing file
  74. is Text, [om] is Binary, and vice versa. If [am] is Y(es) then
  75. output is appended to the existing file; if N(o), the existing
  76. file is overwritten.
  77.  
  78.   After processing any parameters from the DOS prompt, QMAC
  79. itself will prompt for any further parameters needed. When all
  80. such parameters have been provided, QMAC will process the macros
  81. as required.
  82.  
  83.   Answering any QMAC prompt by merely pressing Enter will halt
  84. QMAC.
  85.  
  86.   Answering the prompt for [bfn] with a ? will display the help
  87. summary just as if [?] had been provided at the DOS prompt.
  88.  
  89.   QMAC is crash-resistant, but does not make a lot of effort to
  90. deal with missing files, open disk drives, etc. Encountering an
  91. error it cannot deal with, QMAC will halt with a (hopefully
  92. informative) message.
  93.  
  94.   QMAC can deal with many errors in a macro text file by skipping
  95. to the next macro. It will display the line where the error was
  96. discovered.
  97.  
  98.   The contents of a macro text file are blank lines, comment
  99. lines, and macro lines. QMAC skips blank lines and comment lines.
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.   Comment lines have a * in the first column:
  109.  
  110. * This is a comment line.
  111.  * This is not a comment line and QMAC will reject it.
  112.  
  113. The leading space in the second example line prevents it from
  114. being a comment. Comment lines may be of any length. Note that
  115. comments are not placed in the binary file, and so will not show
  116. up in a text file which has been translated from a binary file.
  117. The primary purpose of comments is to allow documentation of
  118. macro source files.
  119.  
  120.   The first line of a macro must start with the key designator,
  121. followed by the command macro_begin, as shown in the QCONFIG.DAT
  122. file distributed with QEdit 2. An example:
  123.  
  124. ^i macro_begin cursor_up word_right cursor_down
  125.  
  126. The key designator does not have to be in the first column. The
  127. commands may be written in any mixture of upper and lower case,
  128. and do not require the _ character commonly used. This macro will
  129. translate identically to the previous one:
  130.  
  131.     ^I MaCrObEgIn CuRsOrUp WoRdRiGhT cUrSoRdOwN
  132.  
  133.   A macro line is limited to 255 characters, including all
  134. spaces. If QMAC reads a line 255 characters long, it will issue a
  135. warning that the macro may have been truncated. Macros may
  136. continue to an arbitrary number of lines. (Note that no check is
  137. made against QEdit 2's allocation of storage for macros because
  138. that allocation may change from release to release.)  A macro
  139. line which is to be continued must have & as the last character.
  140. Comment lines and/or blank lines may be inserted between the
  141. lines of a continuing macro:
  142.  
  143. @p macrobegin markblockend wordleft markblockbegin endline return
  144.  
  145. * This is a continuing macro. Documenting comments for this macro
  146. * are in the accompanying file QMACROS.PAS.
  147.  
  148. copyblock endline return copyblock unmarkblock "end; {" endline
  149.  
  150. * Note that lines do not have to be 255 characters long
  151. * to be continued. Length less than that is arbitrary.
  152.  
  153. "}" cursorup endline "}" wordleft "begin {" cursorup endline ";"
  154. wordleft "procedure " endline cursorleft
  155. * That's all of that one, folks!
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.   Notice that literal strings appear between " marks, so that "{"
  164. means to insert { at the cursor. Literal strings which must
  165. contain " marks (for whatever reason) should include two " to
  166. display one:
  167.  
  168.        "a ""-marked string"
  169.  
  170. will result in a binary macro containing:
  171.  
  172.        a "-marked string
  173.  
  174.   Requests for help, bug reports, etc., may be directed to Karl
  175. Brendel on CompuServe (73307,3101), GEnie (K.BRENDEL), or at the
  176. bbs shown below. To express your undying gratitude for QMAC,
  177. please register QEdit 2 if you have not already, and pass it (and
  178. QMAC) around for others.
  179.  
  180.   Contact points for QMAC:
  181.  
  182.                  Sleepy Hollow       213 859 9334
  183.                  Software Society    201 729 7410
  184.                  Tamiami PC Board    813 793 2392
  185.  
  186.  
  187.